import pymongo
import requests
client = pymongo.MongoClient("mongodb://localhost:27017")
db = client.Advanced
collection = db.Movie_introduction
requests.packages.urllib3.disable_warnings()
url = 'http://spa1.scrape.center/api/movie/?limit=10&offset=%d'
for i in range(1, 11):
	res = requests.get(url % (i*10), verify=False)
	results = res.json()['results']
	for result in results:
		collection.insert_one(result)
		print(result)
